package event 
{
	import flash.events.Event;
	import flash.utils.Dictionary;
	/**
	 * ...
	 * @author carlor
	 */
	public class CommEvent extends Event
	{
		static public const LOADED_COMPLETE   : String = "LOADED_COMPLETE";
		static public const POSITION_CHANGE   : String = "POSITION_CHANGE";
		static public const MAPPOS_CHANGE	  : String = "MAPPOS_CHANGE";
		static public const MAPLOADED_COMPLETE: String = "MAPLOADED_COMPLETE";
		static public const MAP_VIEWCHANGE    : String = "MAP_VIEWCHANGE";
		static public const MOVE_ARRIVED	  : String = "MOVE_ARRIVED";
		
		static public const DIALOG_SHOW      : String = "DIALOG_SHOW";
		static public const DIALOG_HIDE      : String = "DIALOG_HIDE";
		static public const FORM_SHOW		 : String = "FORM_SHOW";
		static public const FORM_HIDE		 : String = "FORM_HIDE";
		static public const FORM_INIT	     : String = "FORM_INIT";
		static public const FORM_CHANGEOWNER : String = "FORM_CHANGEOWNER";
		
		private var _datas: Dictionary;
		
		public function CommEvent(type: String, bubbles: Boolean = false, cancelable: Boolean = false) 
		{
			super(type, bubbles, cancelable);
			_datas = new Dictionary();
		}
		
		public function addData(name: Object, data: * ): CommEvent
		{
			_datas[name] = data;
			return this;
		}
		
		public function getData(name: Object): *
		{
			return _datas[name];
		}
	}

}